<?php 
function provideLocation()
{
	$sql = "SELECT lati,longi FROM location";
	$link = mysql_connect('localhost','root','d48a4a4e85');
	//print_r($link);
	if(!$link)
	{
		die('Erroe:could not make a database link using');
	}
	mysql_select_db('example',$link);
	$resource = mysql_query($sql,$link);
	$locate_from = mysql_fetch_assoc($resource);
	if(!$locate_from)
	{
		trigger_error('can not get the locate');
	}
	return $locate_from;
}
$location_from = provideLocation();
header("Content-type: application/xml; charset=utf-8");
$content = '<?xml version="1.0" encoding="ISO-8859-1"?>
			<page>
				<position>
					<latitude>' . $location_from['lati'] . '</latitude>
					<longitude>' . $location_from['longi'] . '</longitude>
				</position>
			</page>';
echo $content;
?>